import Vue from 'vue';
import Vuex from 'vuex';

Vue.use(Vuex);
export default new Vuex.Store({
    state:{
        accessToken:'',
        storeGlobalUserInfo: null,
		barHeight: {}
    },
    mutations:{
        // 设置accessToken
        setStoreAccessToken(state, data) {
            state.accessToken = data;
        },
        setStoreGlobalUserInfo(state, data) {
            state.storeGlobalUserInfo = data;
        },
		removeStoreAccessToken(state, data) {
		    state.accessToken = '';
		},
    },
	actions: {
		//相当于异步的操作,不能直接改变state的值，只能通过触发mutations的方法才能改变
	}
})